import { ActionTypeEnum } from "@/enums/actionTypeEnum";
import { ref } from "vue";

export const userUserModal = () => {
  const showUserModal = ref<boolean>(false);
  const userModalTitle = ref<string>("");
  const userModalConfirmLoading = ref<boolean>(false);
  const userDetail = ref<any>({});
  const actionType = ref<ActionTypeEnum>(ActionTypeEnum.ADD);

  const handleToggleShowUserModal = (payload: boolean) => {
    showUserModal.value = payload;
  };

  return {
    showUserModal,
    userModalTitle,
    userModalConfirmLoading,
    userDetail,
    actionType,
    handleToggleShowUserModal,
  };
};
